The underlying mechanism for this approach is chunked transfer encoding.
For example, HTTP / 1.1 introduced chunked transfer encoding to allow content on persistent connections to be streamed rather than buffered.
Chunked transfer encoding uses a chunk size of 0 to mark the end of the content . " Identity " encoding without " Content-Length " reads content until the socket is closed.